﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
                    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=PresentationFramework"
                    xmlns:primitives="clr-namespace:System.Windows.Controls.Primitives;assembly=PresentationFramework"
                    xmlns:sys="clr-namespace:System;assembly=mscorlib"
                    >
    

        <!-- Theme -->
        <SolidColorBrush x:Key="ThemeBackgroundBrush" Color="White" />
        <SolidColorBrush x:Key="ThemeForegroundBrush" Color="Black" />

        <!-- Color Palette -->
        <SolidColorBrush x:Key="OutsideFontColor" Color="#FF000000"/>
        <SolidColorBrush x:Key="ButtonFontColor" Color="#FF042271"/>
        <Color x:Key="Focus">#FF04CCFF</Color>
        <Color x:Key="HyperlinkFocus">#FF2B54BA</Color>
        <Color x:Key="Calendar">#FF0066CC</Color>
        <Color x:Key="PressStroke1">#FF1D415C</Color>
        <Color x:Key="PressStroke2">#FF2C628B</Color>
        <Color x:Key="TabStroke">#FF4F8BB9</Color>
        <Color x:Key="DataSortArrow">#3F2C628B</Color>
        <!--PressStroke2, 25%-->
        <Color x:Key="DropLocate">#FF6392C8</Color>
        <Color x:Key="TreeviewArrowNorm">#FF76D5FD</Color>
        <Color x:Key="TreeviewArrowOver">#FFC1EFF8</Color>
        <Color x:Key="TreeviewArrowCheck">#FF6380EE</Color>
        <Color x:Key="ExpandArrowStroke">#FF688DC4</Color>
        <Color x:Key="Arrow">#FF425080</Color>
        <Color x:Key="Arrow2">#FF7682E4</Color>
        <Color x:Key="TextBkgSelection">#FF309AFF</Color>
        <Color x:Key="TextboxOver1">#FF5296BD</Color>
        <Color x:Key="TextboxOver2">#FFC2E4F6</Color>
        <Color x:Key="TextboxPress1">#FF3B79AC</Color>
        <Color x:Key="TextboxPress2">#FFB2DBED</Color>
        <Color x:Key="ItemOver1">#FFF4FAFD</Color>
        <Color x:Key="ItemOver2">#FFCFEDFD</Color>
        <Color x:Key="ItemOverStroke">#FFD8F0FA</Color>
        <Color x:Key="ItemSelectStroke">#FF98DDFB</Color>
        <Color x:Key="Over1">#FFE2F5FF</Color>
        <Color x:Key="Over2">#FFC0E7FC</Color>
        <Color x:Key="Over3">#FF9EDDFF</Color>
        <Color x:Key="Press1">#FF759FB6</Color>
        <Color x:Key="Press2">#FFB6E0F6</Color>
        <Color x:Key="Press3">#FF9DD5F4</Color>
        <Color x:Key="PressHighlight">#FF387599</Color>
        <Color x:Key="ButtonHighlightMid">#0095D9FF</Color>
        <Color x:Key="ButtonHighlightMid2">#9935A6E6</Color>
        <!--60%-->
        <Color x:Key="ButtonHighlightMid3">#A535A6E6</Color>
        <!--65%-->
        <Color x:Key="RadioIcon1">#FF90D5E5</Color>
        <Color x:Key="RadioIcon2">#FF28A2D1</Color>
        <Color x:Key="RadioIcon3">#FF1898D1</Color>
        <Color x:Key="RadioIcon4">#FF0F83C7</Color>
        <Color x:Key="RadioIconOver1">#FF1EBEFF</Color>
        <Color x:Key="RadioIconOver2">#FF13A2F3</Color>
        <Color x:Key="RadioIconPress1">#99759FB6</Color>
        <!--Press1, 60%-->
        <Color x:Key="RadioIconPress2">#FF4B8DAF</Color>
        <Color x:Key="RadioStroke">#FF275674</Color>
        <Color x:Key="CheckInnerOver">#FF79C6F9</Color>
        <Color x:Key="CheckInnerOver2">#FFAFDEFD</Color>
        <Color x:Key="CheckInnerPress">#FF5EB6F7</Color>
        <Color x:Key="CheckInnerPress2">#FF90CFFC</Color>
        <Color x:Key="CheckOutterOver">#FF5989A5</Color>
        <Color x:Key="CheckOutterOver2">#FFDEF9FA</Color>
        <Color x:Key="ThumbPress1">#FF6CBBE5</Color>
        <Color x:Key="ThumbPress2">#FF50A1CC</Color>
        <Color x:Key="ExpanderOver1">#FFB1E7FE</Color>
        <Color x:Key="ExpanderOver2">#FFEAFFFF</Color>
        <Color x:Key="ExpanderOver3">#A56EB4F6</Color>
        <Color x:Key="ExpanderMid">#009DD5F4</Color>
        <!--Press3, 0%-->
        <Color x:Key="ExpanderPress1">#FF80CEFF</Color>
        <Color x:Key="ExpanderPress2">#FF2D84CF</Color>
        <Color x:Key="ThumbDivetOver">#E5387599</Color>
        <!--PressHighlight, 20%-->
        <Color x:Key="ThumbDivetFill1">#199DD5F4</Color>
        <!--Press3, 10%-->
        <Color x:Key="ThumbDivetFill2">#33387599</Color>
        <!--PressHighlight, 20%-->
        <!-- End Color Palette-->


        <!-- Communal Static Resources -->
        <SolidColorBrush x:Key="btnFocus" Color="{StaticResource Focus}"/>
        <SolidColorBrush x:Key="btnPressStroke1" Color="{StaticResource PressStroke1}"/>
        <SolidColorBrush x:Key="btnPressStroke2" Color="{StaticResource PressStroke2}"/>

        <LinearGradientBrush x:Key="btnPressBorder" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource PressStroke1}" Offset="0"/>
            <GradientStop Color="{StaticResource PressStroke2}" Offset="1"/>
        </LinearGradientBrush>

        <SolidColorBrush x:Key="hyperlinkPress" Color="{StaticResource HyperlinkFocus}"/>
        <SolidColorBrush x:Key="calendarBtnFill" Color="{StaticResource Over2}"/>
        <SolidColorBrush x:Key="calendarTodayStroke" Color="{StaticResource Calendar}"/>
        <SolidColorBrush x:Key="treeviewArrowUnchecked" Color="{StaticResource TreeviewArrowNorm}"/>
        <SolidColorBrush x:Key="treeviewArrowHover" Color="{StaticResource TreeviewArrowOver}"/>
        <SolidColorBrush x:Key="treeviewArrowChecked" Color="{StaticResource TreeviewArrowCheck}"/>

        <SolidColorBrush x:Key="TextBackgroundSelection" Color="{StaticResource TextBkgSelection}"/>
        <SolidColorBrush x:Key="TextBoxOverBrush" Color="{StaticResource TextboxOver1}"/>
        <SolidColorBrush x:Key="TextBoxPressBrush" Color="{StaticResource TextboxPress1}"/>

        <LinearGradientBrush x:Key="TextBoxOver" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource TextboxOver1}" Offset="0"/>
            <GradientStop Color="{StaticResource TextboxOver2}" Offset="0.355"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="TextBoxFocus" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource TextboxPress1}" Offset="0"/>
            <GradientStop Color="{StaticResource TextboxPress2}" Offset="0.355"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="TextBoxNorm" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFABAEB3" Offset="0"/>
            <GradientStop Color="#FFE2E8EE" Offset="0.355"/>
        </LinearGradientBrush>

        <LinearGradientBrush x:Key="grayGradient" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFFFFFFF" Offset="0"/>
            <GradientStop Color="#FFEDEDED" Offset="0.171"/>
            <GradientStop Color="#FFE7E7E7" Offset="0.5"/>
            <GradientStop Color="#FFDCDCDC" Offset="0.51"/>
            <GradientStop Color="#FFEAEBEC" Offset="1"/>
        </LinearGradientBrush>

        <SolidColorBrush x:Key="hoverStroke" Color="{StaticResource ItemOverStroke}"/>
        <SolidColorBrush x:Key="selectedStroke" Color="{StaticResource ItemSelectStroke}"/>

        <LinearGradientBrush x:Key="hoverGradient" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource ItemOver1}" Offset="0.5"/>
            <GradientStop Color="{StaticResource Over1}" Offset="0.5"/>
            <GradientStop Color="{StaticResource ItemOver2}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="hoverGradientVertical" EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="{StaticResource ItemOver1}" Offset="0.5"/>
            <GradientStop Color="{StaticResource Over1}" Offset="0.5"/>
            <GradientStop Color="{StaticResource ItemOver2}" Offset="1"/>
        </LinearGradientBrush>

        <LinearGradientBrush x:Key="BtnOverFill" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource Over1}" Offset="0.5"/>
            <GradientStop Color="{StaticResource Over2}" Offset="0.509"/>
            <GradientStop Color="{StaticResource Over3}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="BtnPressFill" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource Press1}" Offset="0"/>
            <GradientStop Color="{StaticResource Press2}" Offset="0.152"/>
            <GradientStop Color="{StaticResource Over2}" Offset="0.5"/>
            <GradientStop Color="{StaticResource Press3}" Offset="0.509"/>
        </LinearGradientBrush>


        <!-- datagrid specific resources -->
        <SolidColorBrush x:Key="HeaderSeparator" Color="#FFD7D5D8" />
        <SolidColorBrush x:Key="GridBorder" Color="#FFD6D7D6" />
        <SolidColorBrush x:Key="dropLocator" Color="{StaticResource DropLocate}" />
        <LinearGradientBrush x:Key="sortArrow" EndPoint="0.725,0.832" StartPoint="0.275,0.168">
            <GradientStop Color="{StaticResource PressStroke2}"/>
            <GradientStop Color="{StaticResource DataSortArrow}" Offset="1"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="HorizontalVerticalGridLinesBrush">#59D6D7D6</SolidColorBrush>
   
    <!--ColumnHeader-->
    <Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
        <Setter Property="Width" Value="8"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Cursor" Value="SizeWE"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Padding="{TemplateBinding Padding}"
                    Background="{TemplateBinding Background}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key='ColumnHeaderStyle' TargetType='{x:Type primitives:DataGridColumnHeader}'>
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <!--<Setter Property="FontSize" Value="10.5" />-->
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="Padding" Value="4,6,5,6"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SeparatorBrush" Value="#FFC9CACA" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type primitives:DataGridColumnHeader}">
                    <Grid>
                        <themes:DataGridHeaderBorder x:Name='HeaderBorder' 
                                                  SortDirection="{TemplateBinding SortDirection}"
                                                  IsHovered="{TemplateBinding IsMouseOver}"
                                                  IsPressed="{TemplateBinding IsPressed}"
                                                  IsClickable="{TemplateBinding CanUserSort}"
                                                  BorderBrush="{StaticResource HeaderSeparator}"
                                                  Background='{StaticResource grayGradient}'
                                                  BorderThickness="0,0,1,1"

                                                  SeparatorVisibility="{TemplateBinding SeparatorVisibility}"
                                                  SeparatorBrush="{StaticResource HeaderSeparator}">
                            <Grid Background='Transparent' >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width='Auto' />
                                    <ColumnDefinition Width='*' />
                                </Grid.ColumnDefinitions>
                                <Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Grid.RowSpan="2" 
                                   Fill="{StaticResource grayGradient}" Opacity="1"
                                   Stretch="Fill" 
                                   />
                                <Rectangle x:Name="HoverRectangle" 
                                   Grid.ColumnSpan="2" Grid.RowSpan="2" Stretch="Fill" 
                                   Fill="{StaticResource BtnOverFill}" 
                                   Opacity="0" />
                                <Rectangle x:Name="ShineRectangle" 
                                   Fill="{StaticResource hoverGradient}" 
                                   Stretch="Fill" 
                                   Stroke="{StaticResource selectedStroke}" 
                                   Opacity="0"
                                   Grid.ColumnSpan="2" Grid.RowSpan="2"                                   
                                           />
                                <ContentPresenter Grid.Column='0' 
                                                  Grid.ColumnSpan="2"
                                                  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                  Margin='{TemplateBinding Padding}'
                                                  Cursor="{TemplateBinding Cursor}"
                                                  />
                                <Path   x:Name="SortArrow" Margin="0,2,0,0" Height="4" Width="7" 
                                        Grid.ColumnSpan="2"
                                        HorizontalAlignment="Center"
                                        Fill="{StaticResource sortArrow}" 
                                        Stretch="Uniform" Opacity="0" 
                                        Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z "                                         
                                        RenderTransformOrigin="0.5,0.5"
                                        VerticalAlignment="Top" 
                                        >
                                    <Path.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </Path.RenderTransform>
                                </Path>
                            </Grid>
                        </themes:DataGridHeaderBorder>
                        <Thumb x:Name="PART_LeftHeaderGripper"
                   HorizontalAlignment="Left"
                   Style="{StaticResource ColumnHeaderGripperStyle}"/>
                        <Thumb x:Name="PART_RightHeaderGripper"
                   HorizontalAlignment="Right"
                   Style="{StaticResource ColumnHeaderGripperStyle}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="SortDirection" Value="Ascending">
                            <Setter TargetName="SortArrow" Property="Opacity" Value="1" />
                            <Setter TargetName="SortArrow" Property="RenderTransform">
                                <Setter.Value>
                                    <RotateTransform Angle="180" />
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="ShineRectangle" Property="Opacity" Value="1" />
                        </Trigger>
                        <Trigger Property="SortDirection" Value="Descending">
                            <Setter TargetName="SortArrow" Property="Opacity" Value="1" />
                            <Setter TargetName="ShineRectangle" Property="Opacity" Value="1" />
                        </Trigger>
                        <Trigger Property='IsMouseOver' Value='True'>
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation BeginTime="00:00:00" 
                                                         Duration="00:00:00.20000"
                                                         Storyboard.TargetName="HoverRectangle" 
                                                         Storyboard.TargetProperty="(UIElement.Opacity)" 
                                                         To='1.0'                                                         
                                                         />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation BeginTime="00:00:00" 
                                                         Duration="00:00:00.20000"
                                                         Storyboard.TargetName="HoverRectangle" 
                                                         Storyboard.TargetProperty="(UIElement.Opacity)" 
                                                         To='0'                                                         
                                                         />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>


    </Style>

    <!--Cell-->
    <Style x:Key='CellStyle' TargetType="{x:Type controls:DataGridCell}" >
        <Setter Property="Foreground" Value="{StaticResource ThemeForegroundBrush}" />
        <Setter Property="Height" Value="Auto" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Cursor" Value="Arrow" />
        <Setter Property="BorderThickness" Value="1" />
        <!--Padding hack-->
        <Setter Property="Padding" Value="2 5 2 5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:DataGridCell}">
                    <Grid x:Name="Root" Background="Transparent">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Rectangle x:Name="FocusVisual" Margin="0,-2,0,0" 
                                   Stroke="#FF000000" Fill="#FFFFFFFF" 
                                   Opacity="0" IsHitTestVisible="false"/>
                        <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Cursor="{TemplateBinding Cursor}"/>
                        <Rectangle x:Name="RightGridLine" VerticalAlignment="Stretch" Width="1" Grid.Column="1" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property='Opacity' TargetName='FocusVisual' Value='0.8' />
                            <Setter Property="BorderThickness" Value="1" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="IsSelected" 
                Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=controls:DataGridRow}, Path=IsSelected, Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged}"
                />
    </Style>

    <!-- DataGridRow -->
    <Style x:Key='RowStyle' TargetType="{x:Type controls:DataGridRow}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:DataGridRow}">
                    <Border x:Name="DGR_Border"
                  Background="{TemplateBinding Background}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  SnapsToDevicePixels="True">
                        <primitives:SelectiveScrollingGrid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>

                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height='Auto' />
                            </Grid.RowDefinitions>
                            <Rectangle x:Name="Selected" Margin="0" Grid.RowSpan="2" Grid.ColumnSpan="2" 
                                   Fill="{StaticResource BtnOverFill}" Stroke="{StaticResource selectedStroke}" 
                                   Opacity="0"/>
                            <Rectangle x:Name="SelectedHighlight" Margin="1" Grid.RowSpan="2" Grid.ColumnSpan="2" 
                                   Stroke="#A0FFFFFF" 
                                   Opacity="0"/>
                            <primitives:DataGridRowHeader Grid.RowSpan="2"
                                                        primitives:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"                                       
                                                        Visibility="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:DataGrid}}, 
                                Path=HeadersVisibility, 
                                Converter={x:Static controls:DataGrid.HeadersVisibilityConverter},
                                ConverterParameter={x:Static controls:DataGridHeadersVisibility.Row}}"/>
                            <Rectangle x:Name="Over" Margin="0" Grid.RowSpan="2" Grid.ColumnSpan="2" 
                                   Fill="{StaticResource hoverGradient}" 
                                   Stroke="{StaticResource hoverStroke}" 
                                   Opacity="0"/>
                            <primitives:DataGridCellsPresenter Grid.Column="1"
                                            ItemsPanel="{TemplateBinding ItemsPanel}"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                            <primitives:DataGridDetailsPresenter Grid.Column="1" Grid.Row="1"
                                                               x:Name='DetailsPresenter' 
                                                               primitives:SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:DataGrid}}, Path=AreRowDetailsFrozen, Converter={x:Static controls:DataGrid.RowDetailsScrollingConverter}, ConverterParameter={x:Static controls:SelectiveScrollingOrientation.Vertical}}"                                                                                                                         
                                                               Visibility="{TemplateBinding DetailsVisibility}"                                                               
                                                               />
                            <Rectangle Height="1" HorizontalAlignment="Stretch" 
                                       x:Name="BottomGridLine" 
                                       Fill="{StaticResource HorizontalVerticalGridLinesBrush}" 
                                       Grid.Column="1" Grid.Row="2" />
                        </primitives:SelectiveScrollingGrid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property='IsSelected' Value='True'>
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Selected" Storyboard.TargetProperty="Opacity" To="0.84"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="SelectedHighlight" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Selected" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="SelectedHighlight" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                            <!--<Setter Property="DetailsVisibility" Value="Visible" />-->
                        </Trigger>
                        <MultiTrigger >
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsSelected" Value="False" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Over" Storyboard.TargetProperty="Opacity" To="0.73"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Over" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.ExitActions>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="IsFocused" Value="False" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Selected" Storyboard.TargetProperty="Opacity" To="0.84"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="SelectedHighlight" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Selected" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="SelectedHighlight" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.ExitActions>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <!--DataGrid -->
    <Style TargetType='{x:Type controls:DataGrid}'>
        <Setter Property='ScrollViewer.CanContentScroll' Value='False' />
        <Setter Property='AutoGenerateColumns' Value='False' />
        <Setter Property="IsTabStop" Value="True" />
        <Setter Property="RowBackground" Value="#FFFFFFFF"/>
        <Setter Property="Background" Value="#FFFFFFFF"/>
        <Setter Property="AlternatingRowBackground" Value="#FFFFFFFF"/>
        <Setter Property="HorizontalGridLinesBrush" Value="{StaticResource HorizontalVerticalGridLinesBrush}"/>
        <Setter Property="VerticalGridLinesBrush" Value="{StaticResource HorizontalVerticalGridLinesBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridBorder}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property='GridLinesVisibility' Value='All' />
        <Setter Property='SelectionUnit' Value='CellOrRowHeader' />
        <Setter Property='SelectionMode' Value='Single' />
        <Setter Property='IsReadOnly' Value='False' />
        <Setter Property='CanUserAddRows' Value='True' />
        <Setter Property='CanUserSortColumns' Value='True' />
        <Setter Property='CanUserResizeRows' Value='False' />
        <Setter Property='CanUserSortColumns' Value='True' />
        <Setter Property='IsSynchronizedWithCurrentItem' Value='True'/>
        <Setter Property="EnableRowVirtualization" Value="True" />
        <Setter Property='CellStyle' Value='{StaticResource CellStyle}' />
        <Setter Property='RowStyle' Value='{StaticResource RowStyle}' />
        <Setter Property='RowDetailsVisibilityMode' Value='VisibleWhenSelected' />
        <Setter Property='ColumnHeaderStyle' Value='{StaticResource ColumnHeaderStyle}' />
        <Setter Property='VerticalAlignment' Value='Center' />
        <Setter Property='FontFamily' Value='Verdana' />
        <!--FontSize hack-->
        <Setter Property='FontSize' Value='11' />
    </Style>
</ResourceDictionary>